Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Modifier Input Types

The media input map describes the meaning of each input to a track. Each track has particular attributes associated with it, such as size, position, and volume. The media input map of that track describes the mapping of track modifier inputs to track properties. When you want to modify the attributes of a track, you can insert a track modifier input such as kTrackModifierTypeMatrix into the input map. The values stored in the modifier input you inserted will affect the values that are currently stored with the track.

Custom media handlers can define additional input types as necessary. Apple Computer reserves all input types consisting entirely of lowercase letters.

The following input types are currently defined:

enum {
    kTrackModifierTypeMatrix            = 1,
    kTrackModifierTypeClip              = 2,
    kTrackModifierTypeGraphicsMode      = 5,
    kTrackModifierTypeVolume            = 3,
    kTrackModifierTypeBalance           = 4,
    kTrackModifierTypeImage             = 'vide',
    kTrackModifierObjectMatrix          = 6,
    kTrackModifierObjectGraphicsMode    = 7,
    kTrackModifierType3d4x4Matrix       = 8,
    kTrackModifierCameraData            = 9 
    kTrackModifierSoundLocalization     = 10
};

Constant descriptions

kTrackModifierTypeMatrix
Data sent to this input should be in the form of a QuickTime MatrixRecord . The matrix is concatenated with the track and movie matrices to determine the tracks final location and size. The matrix modifier describes relative, not absolute, position and scaling.

kTrackModifierTypeClip
Data sent to this input should be in the form of a QuickDraw region. The region is intersected with the track's source box. See Inside Macintosh: QuickTime for details on how a movie's tracks are assembled.

kTrackModifierTypeGraphicsMode
Data sent to this input should be in the form of a ModifierTrackGraphicsModeRecord data type. The contents of the record are used as the graphics mode setting for the track. The graphics mode is not combined with the track's current graphics mode, but rather overrides it. See "Data Types" for information about the ModifierTrackGraphicsModeRecord data structure.

kTrackModifierTypeVolume
Data sent to this input should be in the form of a 16-bit fixed-point number. This is the same format in which QuickTime sound volume levels are stored. The volume level is used as a scaling factor on the sound track's level. It is multiplied with the track and movie volumes to determine the track's overall volume.

kTrackModifierTypeBalance
Data sent to this input should be in the form of a 8-bit fixed-point number. This is the same format in which QuickTime balance values are stored. The balance value is used as the balance setting for the track. Unlike the volume modifier, it is not concatenated with the track's current balance level, but overrides the current balance level.

kTrackModifierTypeImage
Data sent to this input should be compressed video data, typically from a video track. This input type can be used with sprite and 3D tracks. For sprite tracks, the image data is used to replace the image of a specified image index in the sprite track. The index of the image to replace must be specified in the media input map when the reference is created. For 3D tracks, the image is used to provide a texture for the object specified in the input map.

kTrackModifierObjectMatrix
Data sent to this input should be in the form of a QuickTime MatrixRecord . The matrix is sent to a particular object within the receiving track, as specified by the kTrackModifierObjectID atom in the input map. The matrix acts as an override to the object's current matrix. For example, the matrix could be sent to a sprite within a sprite track. It would cause the sprite to move, not the entire sprite track as would kTrackModifierMatrix .

kTrackModifierObjectGraphicsMode
Data sent to this input should be in the form of a ModifierTrackGraphicsModeRecord data type. The contents of the record are used to vary the opacity of an object within the track. For example, you would use data sent to this input to vary the opacity of a sprite within a sprite track, rather than modifying the opacity of the entire sprite track. See "Data Types" for information about the ModifierTrackGraphicsModeRecord data structure.

kTrackModifierType3d4x4Matrix
Data sent to this input should be in the form of a QuickDraw 3D 4x4 matrix-- TQ3Matrix4x4 . This data is sent to objects within a QuickDraw 3D track. This matrix is concatenated with the all other matrices that effect the specified object. The structure is defined in the book 3D Graphics Programming with QuickDraw 3D 1.5.4.

kTrackModifierCameraData
Data sent to this input should be in the form of a QuickDraw 3D Camera data structure-- TQ3CameraData . This data is sent to a camera within a QuickDraw 3D track. The structure is defined in the book 3D Graphics Programming with QuickDraw 3D 1.5.4.

kTrackModifierSoundLocalization
Data sent to this input should be in the form of a sound localization data record-- SSpLocalizationData . This data overrides the sound localization settings already in use by the track.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |